<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var year = prompt('请输入您的出生年份');
        var age = 2020-year;
        alert('您的年龄是'+ age +'岁');
    </script>
</head>
<body>

</body>
</html>